package com.tanhua.dubbo.api;

import com.tanhua.model.enums.CommentType;
import com.tanhua.model.mongo.Comment;

import java.util.List;

public interface CommentApi {

    //发布评论，并获取评论数量
    Integer save(Comment comment1);

    //分页查询
    List<Comment> findComments(String movementId, CommentType comment, Integer page, Integer pagesize);

    //判断comment数据是否存在
    Boolean hasComment(String movementId, Long userId, CommentType like);

    //删除comment数据
    Integer delete(Comment comment);

    //判断评论是否存在
    Comment findComment(String id, CommentType like);

    //当前该评论的为当前用户，只需要修改喜欢的数，并统计
    Integer upComment(Comment comment);

    //取消当前用户点赞
    Integer downComment(Comment comment);

    //视频评论发布
    Integer videoSave(Comment comment1);

   //视频评论列表
    List<Comment> findVideoComments(String videoId, CommentType comment, Integer page, Integer pagesize);

    //   TODO评论点赞
    Integer likeVideoSave(Comment comment);

    //   TODO取消评论点赞
    Integer disLikeVidroDelete(Comment comment);


    List<Comment> findLikesByUserId(Integer page, Integer pagesize, Long userId, CommentType type);
}
